package string;
//boolean startsWith(String s);
//判断当前字符串是否是以给定的字符串开始的
//boolean endsWith(String s)
//判断当前字符串是否是以给定的字符串结束的
public class StartsWithDemo {
    public static void main(String[] args) {
        String str="thinking in java";
        boolean starts=str.startsWith("think");
        System.out.println(starts);
        boolean ends=str.endsWith(".png");
        System.out.println(ends);


        String str1="Best wishes for you!";
        boolean starts1=str.startsWith("Best");
        System.out.println(starts1);
        boolean ends1=str1.endsWith("think");
        System.out.println(ends1);
    }
}
